<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>欢迎进入</title>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#btn_submit').click(function () {
                console.log($.fn.jquery);
                console.log("hello")
                $.ajax({
                    url: "http://localhost:8080/view/session1", //要请求的后端地址
                    type: "GET", //数据发送的方式(POST或者GET)
                    // data: {val1: "1", val2: "2"}, //需要传递的参数
                    dataType: "json", //后端返回的数据格式
                    success: function (result) {//ajax请求成功后触发的方法
                        console.log(result); //result为响应内容
                    },
                    error: function () {//ajax请求失败后触发的方法
                        console.log('Send Request Fail..');
                    }
                });
                location.href = "http://localhost:63342/mikeshopOnline/templates/user/redirect.html?_ijt=593llqora4hlg4b30td0ek6bdh";
            });
        });
    </script>
</head>
<body>
<div style="text-align: center;">
    <h2>主页 one</h2>
    <button id="btn_submit">点我</button>
</div>
</body>
</html>